I installed binary pkg on ubuntu 21.04 to put into my study.
And I use "g++ -std=c++17 test.cpp -o test" to run a file. Some errors happens. Please help me.
The error is like the following:
fsrmlgd@fsrmlgd:~/tools$ g++ -std=c++17 test.cpp -o test
/usr/bin/ld: /tmp/ccae4fSO.o: in function main': test.cpp:(.text+0x289): undefined reference to matplot::gcf()'
/usr/bin/ld: test.cpp:(.text+0x2b2): undefined reference to matplot::figure_type::width() const' /usr/bin/ld: test.cpp:(.text+0x2be): undefined reference to matplot::figure_type::width(unsigned int)'
/usr/bin/ld: test.cpp:(.text+0x2e2): undefined reference to matplot::subplot(unsigned long, unsigned long, unsigned long, bool)' /usr/bin/ld: test.cpp:(.text+0x387): undefined reference to matplot::title(std::basic_string_view)'
/usr/bin/ld: test.cpp:(.text+0x3ab): undefined reference to matplot::subplot(unsigned long, unsigned long, unsigned long, bool)' /usr/bin/ld: test.cpp:(.text+0x455): undefined reference to matplot::title(std::basic_string_view)'
/usr/bin/ld: /tmp/ccae4fSO.o: in function matplot::show()': test.cpp:(.text._ZN7matplot4showEv[_ZN7matplot4showEv]+0x24): undefined reference to matplot::gcf()'
/usr/bin/ld: test.cpp:(.text._ZN7matplot4showEv[_ZN7matplot4showEv]+0x38): undefined reference to matplot::figure_type::show()' /usr/bin/ld: /tmp/ccae4fSO.o: in function matplot::save(std::__cxx11::basic_string const&)':
test.cpp:(.text._ZN7matplot4saveERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE[_ZN7matplot4saveERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE]+0x28): undefined reference to matplot::gcf()' /usr/bin/ld: test.cpp:(.text._ZN7matplot4saveERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE[_ZN7matplot4saveERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE]+0x46): undefined reference to matplot::figure_type::save(std::__cxx11::basic_string const&)'
/usr/bin/ld: /tmp/ccae4fSO.o: in function auto matplot::area(std::vector, double&&)': test.cpp:(.text._ZN7matplot4areaISt6vectorIS1_IdSaIdEESaIS3_EEJdEEEDaT_DpOT0_[_ZN7matplot4areaISt6vectorIS1_IdSaIdEESaIS3_EEJdEEEDaT_DpOT0_]+0x30): undefined reference to matplot::gca()'
/usr/bin/ld: test.cpp:(.text.ZN7matplot4areaISt6vectorIS1_IdSaIdEESaIS3_EEJdEEEDaT_DpOT0[ZN7matplot4areaISt6vectorIS1_IdSaIdEESaIS3_EEJdEEEDaT_DpOT0]+0x8c): undefined reference to matplot::axes_type::area(std::vector const&, double, bool, std::basic_string_view)' /usr/bin/ld: /tmp/ccae4fSO.o: in function auto matplot::area(std::vector, int&&, bool&&)':
test.cpp:(.text.ZN7matplot4areaISt6vectorIS1_IdSaIdEESaIS3_EEJibEEEDaT_DpOT0[ZN7matplot4areaISt6vectorIS1_IdSaIdEESaIS3_EEJibEEEDaT_DpOT0]+0x36): undefined reference to matplot::gca()' /usr/bin/ld: test.cpp:(.text._ZN7matplot4areaISt6vectorIS1_IdSaIdEESaIS3_EEJibEEEDaT_DpOT0_[_ZN7matplot4areaISt6vectorIS1_IdSaIdEESaIS3_EEJibEEEDaT_DpOT0_]+0xad): undefined reference to matplot::axes_type::area(std::vector const&, double, bool, std::basic_string_view)'
collect2: error: ld returned 1 exit status
|